{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8f09293d-7203-4c3e-b834-c3c7e07c98e4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "Collecting openai\n",
      "  Downloading openai-0.10.5.tar.gz (157 kB)\n",
      "     |████████████████████████████████| 157 kB 168 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25hRequirement already satisfied: requests>=2.20 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from openai) (2.27.1)\n",
      "Collecting tqdm\n",
      "  Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB)\n",
      "     |████████████████████████████████| 78 kB 207 kB/s            \n",
      "\u001b[?25hCollecting openai\n",
      "  Downloading openai-0.10.4.tar.gz (157 kB)\n",
      "     |████████████████████████████████| 157 kB 184 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.10.3.tar.gz (157 kB)\n",
      "     |████████████████████████████████| 157 kB 66 kB/s             \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.10.2.tar.gz (156 kB)\n",
      "     |████████████████████████████████| 156 kB 420 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.10.1.tar.gz (155 kB)\n",
      "     |████████████████████████████████| 155 kB 116 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.10.0.tar.gz (155 kB)\n",
      "     |████████████████████████████████| 155 kB 292 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.9.4.tar.gz (156 kB)\n",
      "     |████████████████████████████████| 156 kB 183 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.9.3.tar.gz (155 kB)\n",
      "     |████████████████████████████████| 155 kB 261 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.9.2.tar.gz (155 kB)\n",
      "     |████████████████████████████████| 155 kB 226 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.9.1.tar.gz (156 kB)\n",
      "     |████████████████████████████████| 156 kB 195 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.9.0.tar.gz (155 kB)\n",
      "     |████████████████████████████████| 155 kB 240 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Downloading openai-0.8.0.tar.gz (147 kB)\n",
      "     |████████████████████████████████| 147 kB 151 kB/s            \n",
      "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25hRequirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.20->openai) (1.23)\n",
      "Requirement already satisfied: charset-normalizer~=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.20->openai) (2.0.12)\n",
      "Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.20->openai) (3.4)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests>=2.20->openai) (2021.5.30)\n",
      "Collecting importlib-resources\n",
      "  Downloading importlib_resources-5.4.0-py3-none-any.whl (28 kB)\n",
      "Requirement already satisfied: zipp>=3.1.0 in /Users/yuanzh/Library/Python/3.6/lib/python/site-packages (from importlib-resources->tqdm->openai) (3.4.0)\n",
      "Building wheels for collected packages: openai\n",
      "  Building wheel for openai (setup.py) ... \u001b[?25ldone\n",
      "\u001b[?25h  Created wheel for openai: filename=openai-0.8.0-py3-none-any.whl size=158508 sha256=bebb79e2108a847fe5b15c75d4d9d5fd6d2350b915d5515e201db0af01a855ea\n",
      "  Stored in directory: /Users/yuanzh/Library/Caches/pip/wheels/4e/3f/5c/b2d5d333479d94790b102b14ace60d6313c20d7034cb7e035b\n",
      "Successfully built openai\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "Installing collected packages: importlib-resources, tqdm, openai\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "Successfully installed importlib-resources-5.4.0 openai-0.8.0 tqdm-4.64.1\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -sonschema (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution - (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -ertifi (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: Ignoring invalid distribution -equests (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)\u001b[0m\n",
      "\u001b[33mWARNING: You are using pip version 21.3; however, version 21.3.1 is available.\n",
      "You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -m pip install --upgrade pip' command.\u001b[0m\n",
      "env: OPENAI_API_KEY=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\n"
     ]
    }
   ],
   "source": [
    "!pip install openai\n",
    "%env OPENAI_API_KEY=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"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "770ba8f1-dbf2-4f6a-bb84-8f320ec07d76",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
